<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="vue.js"></script>
    <style>
        ul{
            list-style: none;
            background-color: rgb(228, 226, 226);
        }
        ul li{
            display: inline-block;
            padding: 10px 20px;
            cursor: pointer;
        }
        .item{
            display: none;
        }
        .active{
            background-color: red;
            color: white;
        }
        .item{
            display: none;
        }
        .item-show{
            display: block;
        }
    </style>
</head>
<body>
    <div id='app'>
        <ul>
            <li v-for="(item,index in tab" :class="curindex == index ? 'active':''" @click="curindex=index">{{item}}</li>
        </ul>
        <div class=="item" :class="curindex == index ? 'item-show':'item'" v-for="(item,index in tab">
            {{item}}
        </div>
    </div> 
    <script>
        new Vue({
            el:'#app',
            data:{
                tab:['商品介绍','规格与包装','售后管理','产品评价','本店好评商品'],
                curindex:0,
            },
            
        })
    </script>
</body>
</html>